Optimal. Leaf size=78 \[ \frac {4 \sin \left (\frac {2 c}{d}\right ) \text {Ci}\left (\frac {2 c}{d}+2 x\right )}{d^2}-\frac {4 \cos \left (\frac {2 c}{d}\right ) \text {Si}\left (\frac {2 c}{d}+2 x\right )}{d^2}+\frac {\sin ^2(x)}{d (c+d x)}-\frac {3 \cos ^2(x)}{d (c+d x)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.24, antiderivative size = 78, normalized size of antiderivative = 1.00, number of steps used = 12, number of rules used = 6, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {4431, 3313, 12, 3303, 3299, 3302} \[ \frac {4 \sin \left (\frac {2 c}{d}\right ) \text {CosIntegral}\left (\frac {2 c}{d}+2 x\right )}{d^2}-\frac {4 \cos \left (\frac {2 c}{d}\right ) \text {Si}\left (\frac {2 c}{d}+2 x\right )}{d^2}+\frac {\sin ^2(x)}{d (c+d x)}-\frac {3 \cos ^2(x)}{d (c+d x)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 3299
Rule 3302
Rule 3303
Rule 3313
Rule 4431
Rubi steps
\begin {align*} \int \frac {\csc (x) \sin (3 x)}{(c+d x)^2} \, dx &=\int \left (\frac {3 \cos ^2(x)}{(c+d x)^2}-\frac {\sin ^2(x)}{(c+d x)^2}\right ) \, dx\\ &=3 \int \frac {\cos ^2(x)}{(c+d x)^2} \, dx-\int \frac {\sin ^2(x)}{(c+d x)^2} \, dx\\ &=-\frac {3 \cos ^2(x)}{d (c+d x)}+\frac {\sin ^2(x)}{d (c+d x)}-\frac {2 \int \frac {\sin (2 x)}{2 (c+d x)} \, dx}{d}+\frac {6 \int -\frac {\sin (2 x)}{2 (c+d x)} \, dx}{d}\\ &=-\frac {3 \cos ^2(x)}{d (c+d x)}+\frac {\sin ^2(x)}{d (c+d x)}-\frac {\int \frac {\sin (2 x)}{c+d x} \, dx}{d}-\frac {3 \int \frac {\sin (2 x)}{c+d x} \, dx}{d}\\ &=-\frac {3 \cos ^2(x)}{d (c+d x)}+\frac {\sin ^2(x)}{d (c+d x)}-\frac {\cos \left (\frac {2 c}{d}\right ) \int \frac {\sin \left (\frac {2 c}{d}+2 x\right )}{c+d x} \, dx}{d}-\frac {\left (3 \cos \left (\frac {2 c}{d}\right )\right ) \int \frac {\sin \left (\frac {2 c}{d}+2 x\right )}{c+d x} \, dx}{d}+\frac {\sin \left (\frac {2 c}{d}\right ) \int \frac {\cos \left (\frac {2 c}{d}+2 x\right )}{c+d x} \, dx}{d}+\frac {\left (3 \sin \left (\frac {2 c}{d}\right )\right ) \int \frac {\cos \left (\frac {2 c}{d}+2 x\right )}{c+d x} \, dx}{d}\\ &=-\frac {3 \cos ^2(x)}{d (c+d x)}+\frac {4 \text {Ci}\left (\frac {2 c}{d}+2 x\right ) \sin \left (\frac {2 c}{d}\right )}{d^2}+\frac {\sin ^2(x)}{d (c+d x)}-\frac {4 \cos \left (\frac {2 c}{d}\right ) \text {Si}\left (\frac {2 c}{d}+2 x\right )}{d^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.14, size = 61, normalized size = 0.78 \[ \frac {4 \sin \left (\frac {2 c}{d}\right ) \text {Ci}\left (2 \left (\frac {c}{d}+x\right )\right )-4 \cos \left (\frac {2 c}{d}\right ) \text {Si}\left (2 \left (\frac {c}{d}+x\right )\right )-\frac {d (2 \cos (2 x)+1)}{c+d x}}{d^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.48, size = 95, normalized size = 1.22 \[ -\frac {4 \, d \cos \relax (x)^{2} + 4 \, {\left (d x + c\right )} \cos \left (\frac {2 \, c}{d}\right ) \operatorname {Si}\left (\frac {2 \, {\left (d x + c\right )}}{d}\right ) - 2 \, {\left ({\left (d x + c\right )} \operatorname {Ci}\left (\frac {2 \, {\left (d x + c\right )}}{d}\right ) + {\left (d x + c\right )} \operatorname {Ci}\left (-\frac {2 \, {\left (d x + c\right )}}{d}\right )\right )} \sin \left (\frac {2 \, c}{d}\right ) - d}{d^{3} x + c d^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.20, size = 111, normalized size = 1.42 \[ \frac {4 \, d x \operatorname {Ci}\left (\frac {2 \, {\left (d x + c\right )}}{d}\right ) \sin \left (\frac {2 \, c}{d}\right ) - 4 \, d x \cos \left (\frac {2 \, c}{d}\right ) \operatorname {Si}\left (\frac {2 \, {\left (d x + c\right )}}{d}\right ) + 4 \, c \operatorname {Ci}\left (\frac {2 \, {\left (d x + c\right )}}{d}\right ) \sin \left (\frac {2 \, c}{d}\right ) - 4 \, c \cos \left (\frac {2 \, c}{d}\right ) \operatorname {Si}\left (\frac {2 \, {\left (d x + c\right )}}{d}\right ) - 2 \, d \cos \left (2 \, x\right ) - d}{d^{3} x + c d^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.05, size = 82, normalized size = 1.05 \[ -\frac {2 \cos \left (2 x \right )}{\left (d x +c \right ) d}-\frac {2 \left (\frac {2 \Si \left (\frac {2 c}{d}+2 x \right ) \cos \left (\frac {2 c}{d}\right )}{d}-\frac {2 \Ci \left (\frac {2 c}{d}+2 x \right ) \sin \left (\frac {2 c}{d}\right )}{d}\right )}{d}-\frac {1}{d \left (d x +c \right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [C] time = 0.40, size = 324, normalized size = 4.15 \[ -\frac {{\left (E_{2}\left (\frac {2 i \, d x + 2 i \, c}{d}\right ) + E_{2}\left (-\frac {2 i \, d x + 2 i \, c}{d}\right )\right )} \cos \left (\frac {2 \, c}{d}\right )^{3} + {\left (i \, E_{2}\left (\frac {2 i \, d x + 2 i \, c}{d}\right ) - i \, E_{2}\left (-\frac {2 i \, d x + 2 i \, c}{d}\right )\right )} \sin \left (\frac {2 \, c}{d}\right )^{3} + {\left ({\left (E_{2}\left (\frac {2 i \, d x + 2 i \, c}{d}\right ) + E_{2}\left (-\frac {2 i \, d x + 2 i \, c}{d}\right )\right )} \cos \left (\frac {2 \, c}{d}\right ) + 2\right )} \sin \left (\frac {2 \, c}{d}\right )^{2} + {\left (E_{2}\left (\frac {2 i \, d x + 2 i \, c}{d}\right ) + E_{2}\left (-\frac {2 i \, d x + 2 i \, c}{d}\right )\right )} \cos \left (\frac {2 \, c}{d}\right ) + 2 \, \cos \left (\frac {2 \, c}{d}\right )^{2} + {\left ({\left (i \, E_{2}\left (\frac {2 i \, d x + 2 i \, c}{d}\right ) - i \, E_{2}\left (-\frac {2 i \, d x + 2 i \, c}{d}\right )\right )} \cos \left (\frac {2 \, c}{d}\right )^{2} + i \, E_{2}\left (\frac {2 i \, d x + 2 i \, c}{d}\right ) - i \, E_{2}\left (-\frac {2 i \, d x + 2 i \, c}{d}\right )\right )} \sin \left (\frac {2 \, c}{d}\right )}{2 \, {\left ({\left (\cos \left (\frac {2 \, c}{d}\right )^{2} + \sin \left (\frac {2 \, c}{d}\right )^{2}\right )} d^{2} x + {\left (c \cos \left (\frac {2 \, c}{d}\right )^{2} + c \sin \left (\frac {2 \, c}{d}\right )^{2}\right )} d\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {\sin \left (3\,x\right )}{\sin \relax (x)\,{\left (c+d\,x\right )}^2} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sin {\left (3 x \right )} \csc {\relax (x )}}{\left (c + d x\right )^{2}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________